﻿using System;
using System.Diagnostics;
using System.Threading;

namespace ThreadPriorityDemo
{
    class Program
    {
        static void Main(string[] args)
        {

            //提高进程的优先级
            using (Process p = Process.GetCurrentProcess())
            {
                p.PriorityClass = ProcessPriorityClass.High;
            }

            //提高线程优先级
            Thread.CurrentThread.Priority = ThreadPriority.Highest;
            
        }
    }
}
